﻿using IBLL;
using IDAL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class HouseTypeBLL : IHouseTypeBLL
    {
        public HouseTypeBLL(IBaseDAL<HouseType> dAL)
        {
            DAL = dAL;
        }

        public IBaseDAL<HouseType> DAL { get; }
        /// <summary>
        /// 房型添加
        /// </summary>
        /// <param name="houseType">房型实体对象</param>
        /// <returns></returns>
        public async Task<int> AddAsync(HouseType houseType)
        {
            return await DAL.AddAsync(houseType);
        }
        /// <summary>
        /// 房型预备查
        /// </summary>
        /// <returns></returns>
        public List<HouseType> GetAll()
        {
           return DAL.GetAll().ToList();
        }
    }
}
